﻿#ifndef INITWIDGET_H
#define INITWIDGET_H

#include <QMouseEvent>
#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui { class InitWidget; }
QT_END_NAMESPACE

class InitWidget : public QWidget
{
    Q_OBJECT

public:
    InitWidget(QWidget *parent = nullptr);
    ~InitWidget();

    void initWindow();  //初始化窗口控件
    void loadQssFile(); //加载qss

    void addWidget(QWidget *widget);
protected:
    void mousePressEvent(QMouseEvent*event);
    void mouseMoveEvent(QMouseEvent*event);
    void mouseReleaseEvent(QMouseEvent*event);
    void mouseDoubleClickEvent(QMouseEvent*event);

private:
    void windowMin();
    void windowMax();
    void windowClose();

public slots:
    void show();
    void updateTime();
signals:
    void appQuit();
private:
    Ui::InitWidget *ui;

    bool isPressed;
    bool isMaxWin;
    QPoint curPos;
};
#endif // INITWIDGET_H
